<?php


namespace App\Request\client;


use App\Request\CommonRequest;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class WeworkFriendRequest extends CommonRequest
{
    protected $name = '用户信息上报验证';

    protected $rule = [
        'getFriendsInfo' => [
            'friendsId' => 'required',
        ],
        'setRemark' => [
            'marketUserId' => 'required',
            'friendsId' => 'required',
            'marketUserType' => 'required',
            'remark' => 'required',
        ],
        'getContactsList' => [
            'pageNum' => 'required',
            'pageSize' => 'required',
            'userId' => 'required',
        ]
    ];

    protected $message = [
        'friendsId.required' => '好友用户信息有误',
        'marketUserId.required' => '运营号编号有误',
        'remark.required' => '备注不能为空',
        'pageNum.required' => '页数不能为空',
        'pageSize.required' => '每页条数不能为空',
        'userId.required' => '客服编号不能为空',
    ];


    /**
     * 验证
     * @param array $params
     * @param string $scenes
     * @return bool
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function validated(array $params, string $scenes): bool
    {
        return $this->__validated($params, $scenes);
    }
}